package com.qikecn.utils;

public class StateLevelUtil {
	
	/**
	 * 根据用户消费额度，评级
	 * @param money_total
	 * @return
	 */
	public static String getLevelDesc(double money_total){
		String levelDesc = "";
		if(money_total<1000){
			levelDesc = "普通会员";
		}else if(money_total<5000){
			levelDesc = "铜牌会员";
		}else if(money_total<20000){
			levelDesc = "金牌会员";
		}else {
			levelDesc = "钻石会员";
		}
		return levelDesc;
	}
	
	/*public static String getLevelDesc(int level){
		String levelDesc = "";
		switch (level) {
		case 1:
			levelDesc = "普通会员";
			break;
		case 2:
			levelDesc = "铜牌会员";
			break;
		case 3:
			levelDesc = "金牌会员";
			break;
		case 4:
			levelDesc = "钻石会员";
			break;
		}
		return levelDesc;
	}*/
	
	
	/**
	 * 获取订单状态描述
	 * @param state
	 * @return
	 */
	public static String getOrderStateDesc(int state){
		String stateDesc = "" + state;
		switch (state) {
		case 0:
			stateDesc = "待付款";
			break;
		case 5:
			stateDesc = "已付款";
			break;
		case 10:
			stateDesc = "已发货";
			break;
		case 15:
			stateDesc = "交易完成";
			break;
		case 20:
			stateDesc = "申请退款";
			break;
		case 25:
			stateDesc = "已退款";
			break;
		case 30:
			stateDesc = "未付款取消";
			break;
		case 35:
			stateDesc = "已付款取消";
			break;
		case 100:
			stateDesc = "订单异常";
			break;
		}
		return stateDesc;
	}
}
